Optimal. Leaf size=61 \[ \frac{\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac{\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac{x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0973967, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3888, 3882, 8} \[ \frac{\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac{\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac{x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3882
Rule 8
Rubi steps
\begin{align*} \int \frac{\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac{\int \cot ^4(c+d x) (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=\frac{\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac{\int \cot ^2(c+d x) (3 a-2 a \sec (c+d x)) \, dx}{3 a^2}\\ &=-\frac{\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac{\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac{\int -3 a \, dx}{3 a^2}\\ &=-\frac{x}{a}-\frac{\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac{\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}\\ \end{align*}
Mathematica [A] time = 0.768036, size = 100, normalized size = 1.64 \[ \frac{\sec (c+d x) \left (-12 d x \cos ^2\left (\frac{1}{2} (c+d x)\right )-\tan \left (\frac{1}{2} (c+d x)\right )+\sin \left (\frac{d x}{2}\right ) \cos \left (\frac{1}{2} (c+d x)\right ) \left (3 \csc \left (\frac{c}{2}\right ) \cot \left (\frac{1}{2} (c+d x)\right )+13 \sec \left (\frac{c}{2}\right )\right )\right )}{6 a d (\sec (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 74, normalized size = 1.2 \begin{align*} -{\frac{1}{12\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{1}{da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{da}}-{\frac{1}{4\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.73576, size = 126, normalized size = 2.07 \begin{align*} \frac{\frac{\frac{12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac{24 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac{3 \,{\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.08635, size = 170, normalized size = 2.79 \begin{align*} -\frac{4 \, \cos \left (d x + c\right )^{2} + 3 \,{\left (d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{3 \,{\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cot ^{2}{\left (c + d x \right )}}{\sec{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.33486, size = 89, normalized size = 1.46 \begin{align*} -\frac{\frac{12 \,{\left (d x + c\right )}}{a} + \frac{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 12 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{3}} + \frac{3}{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]